<template>
  <div style="background-color: #eeeeee;height:932px">
    <van-nav-bar
        title="我得钱包"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
    />
<!--    图片插入-->
    <p style="font-size: 18px">购买套餐！骑行更划算</p>
    <van-image
        width="570"
        height="269"
        src="https://ts1.cn.mm.bing.net/th/id/R-C.cf778039a90bc4319be7d992434eaf28?rik=CXz9K%2b6pmBxqbg&riu=http%3a%2f%2fimg.iapply.cn%2f2c593ad3d5af853cf3a9559e219e2b07&ehk=3YdE9VZUFcYh6ecSe6v8m%2bPw1XaYWpHmXRy8hDFs8nI%3d&risl=&pid=ImgRaw&r=0"
        @click="tc"
    />
<!--    押金状态-->
      <van-cell title="押金状态" :value="depositStatus ? '已缴纳' : '未缴纳'" @click="tcss"/>
    <van-cell title="我的套餐" @click="tccc"/>
    <div>
    </div>
<!--    我得套餐-->

  </div>
</template>
<script setup>
import {useRouter} from "vue-router";
const route = useRouter()
import {onMounted, ref} from 'vue';
import {zhuangT} from "@/api/zhuangT.js";
  const onClickLeft = () => {
    // 返回上一页
    route.push('/userinfo')
  }
  const tc=()=>{
    route.push('/packagee')
  }

//   押金状态
const depositStatus = ref(false);

// 模拟从后端获取押金状态的方法
const fetchDepositStatus = async () => {
  // codeMessage.value="已缴纳"
  const {data} = await zhuangT();
  console.log(data)
  if (data.code==200){
    depositStatus.value=true;
  }else {
    depositStatus.value = false;
  }
};


onMounted(() => {
  fetchDepositStatus();
});
const tcss=()=>{
  route.push('/deposit')
}
const tccc=()=>{
  route.push('/packagee')
}
</script>